package demo;
import java.util.Scanner;
public class KTNT {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		if(ktnt(n))
			System.out.println("N la nguyen to");
		else
			System.out.println("N KHONG phai la nguyen to");
	}
	
	static boolean ktnt(int n){
		if(n<2) return false;
		if(n==2 || n==3) return true;
		int k = (int)Math.sqrt(n);
		for(int i=2;i<=k;i++)
			if(n%i==0) return false;
		return true;
	}
}
